package com.recycle.controller;

import com.recycle.common.ServerResponse;
import com.recycle.req.UserReq;
import com.recycle.res.UserResp;
import com.recycle.service.UserService;
import jakarta.servlet.http.HttpSession;
import jakarta.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpRequest;
import org.springframework.web.bind.annotation.*;

@RequestMapping("/user")
@RestController
public class UserController {
    @Autowired
    private UserService userService;
    @Autowired
    private HttpSession httpSession;
    @PostMapping("/login")
    public ServerResponse<UserResp> login( @RequestBody @Valid UserReq userReq){
      return  userService.login(userReq);

    }
   @GetMapping("/hellos")
    public  String test(){
        return "hello wqord";
    }
}
